<script>
	export default {
		onLaunch: function() {
			// 判断用户登录状态
			const OPEN_ID = uni.getStorageSync('OPEN-ID');
			if (OPEN_ID) {
				this.$sendRequest.loginByOpenid({
					openid: OPEN_ID
				}).then((res) => {
					if (res.code == 200) {
						uni.setStorageSync("Authorization", res.data);
					} else {
						this.$refs.uToast.show({
							message: res.message,
							type: 'error',
						})
					}
				}).catch(err => {})
			}
		},
		onShow: function() {},
		onHide: function() {}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import "@/uni_modules/uview-ui/index.scss";
	/*每个页面公共css */
	@import './static/css/style.css';
</style>